﻿using System;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace Curriculum.Business.LectorDatos
{
	[XmlRoot(Namespace="", IsNullable=false)]
	[Serializable]
	public class Presentaciones 
	{
		[XmlElement("presentacion", Form=XmlSchemaForm.Unqualified)]
		public Presentacion[] Items;
	}

	[Serializable]
	public class Presentacion 
	{
		[XmlElement(Form=XmlSchemaForm.Unqualified)]
		public string fecha;
	    
		[XmlElement(Form=XmlSchemaForm.Unqualified)]
		public string lugar;
	    
		[XmlElement(Form=XmlSchemaForm.Unqualified)]
		public string proposito;
	    
		[XmlElement(Form=XmlSchemaForm.Unqualified)]
		public string comentario;
	    
//		[XmlArray(Form=XmlSchemaForm.Unqualified)]
		[XmlArrayItem("antecedente", typeof(IdAntecedente), Form=XmlSchemaForm.Unqualified)]
		public IdAntecedente[] antecedentes;
//	    
//		[XmlArray(Form=XmlSchemaForm.Unqualified)]
		[XmlArrayItem("antecedentePersistente", typeof(IdAntecedentePersistente), Form=XmlSchemaForm.Unqualified)]
		public IdAntecedentePersistente[] antecedentesPersistentes;
	    
		[XmlAttribute()]
		public string id;
	}

	[Serializable]
	public class IdAntecedente 
	{
		[XmlText()]
		public string Value;

		public override string ToString()
		{
			return Value.ToString();
		}
		public override int GetHashCode()
		{
			return base.GetHashCode ();
		}

		public override bool Equals(object obj)
		{
			return Value.Equals( ((IdAntecedente)obj).Value);
		}

	}
	[Serializable]
	public class IdAntecedentePersistente 
	{
		[XmlText()]
		public string Value;

		public override string ToString()
		{
			return Value.ToString();
		}
		public override bool Equals(object obj)
		{
			return Value.Equals( ((IdAntecedentePersistente)obj).Value);
		}
		public override int GetHashCode()
		{
			return base.GetHashCode ();
		}

	}		
}